<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>spaceship.PlayerShip</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="spaceship-module.html">Module&nbsp;spaceship</a> ::
        Class&nbsp;PlayerShip
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="spaceship.PlayerShip-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class PlayerShip</h1><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
       <a href="base.AGObject-class.html">base.AGObject</a> --+                
                       |                
          object --+   |                
                   |   |                
pygame.sprite.Sprite --+                
                       |                
                <a href="spaceship.AGSprite-class.html">AGSprite</a> --+            
                           |            
                <a href="spaceship.Destructible-class.html">Destructible</a> --+        
                               |        
                     <a href="spaceship.BonusHolder-class.html">BonusHolder</a> --+    
                                   |    
                                <a href="spaceship.Ship-class.html">Ship</a> --+
                                       |
                                      <strong class="uidshort">PlayerShip</strong>
</pre>

<hr />
Represents the player's ship in way similiar to described in project's
  wiki (but simpler). In later stage some funcionality of this class may be
  moved to not yet existant class Hull.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pos</span>,
        <span class="summary-sig-arg">*groups</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="exhaust"></a><span class="summary-sig-name">exhaust</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">on</span>)</span><br />
      Change the image of the ship by adding or removing an engine 
      exhaust at the bottom.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.exhaust">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#fly_up" class="summary-sig-name">fly_up</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">on</span>)</span><br />
      Either turn on the engine exhaust and move the ship up or turn it 
      off.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_up">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#fly_down" class="summary-sig-name">fly_down</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">boundary</span>)</span><br />
      Move the ship down.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_down">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="fly_left"></a><span class="summary-sig-name">fly_left</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Move the ship left.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_left">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#fly_right" class="summary-sig-name">fly_right</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">boundary</span>)</span><br />
      Move the ship right.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_right">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_current_weapon"></a><span class="summary-sig-name">get_current_weapon</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.get_current_weapon">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="next_weapon"></a><span class="summary-sig-name">next_weapon</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Select next weapon.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.next_weapon">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="previous_weapon"></a><span class="summary-sig-name">previous_weapon</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Select previous weapon.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.previous_weapon">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#shoot" class="summary-sig-name">shoot</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Shot from currently selected weapon.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.shoot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="activate_shield"></a><span class="summary-sig-name">activate_shield</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">on</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.activate_shield">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#damage" class="summary-sig-name">damage</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">damage</span>,
        <span class="summary-sig-arg">speed</span>=<span class="summary-sig-default">None</span>)</span><br />
      Deal damage and check whether the object ceases to exist.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.damage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Update ship state (center, weapons, shield, armour, reactor, 
      etc.)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.update">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.Ship-class.html">Ship</a></code></b>:
      <code><a href="spaceship.Ship-class.html#explode">explode</a></code>,
      <code><a href="spaceship.Ship-class.html#recharge">recharge</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.BonusHolder-class.html">BonusHolder</a></code></b>:
      <code><a href="spaceship.BonusHolder-class.html#kill">kill</a></code>,
      <code><a href="spaceship.BonusHolder-class.html#set_bonus">set_bonus</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.BonusHolder-class.html">BonusHolder</a></code></b> (private):
      <code><a href="spaceship.BonusHolder-class.html#_create_bonus">_create_bonus</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.AGSprite-class.html">AGSprite</a></code></b>:
      <code><a href="spaceship.AGSprite-class.html#closest">closest</a></code>,
      <code><a href="spaceship.AGSprite-class.html#distance">distance</a></code>,
      <code><a href="spaceship.AGSprite-class.html#is_offscreen">is_offscreen</a></code>,
      <code><a href="spaceship.AGSprite-class.html#set_mover">set_mover</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.AGSprite-class.html">AGSprite</a></code></b> (private):
      <code><a href="spaceship.AGSprite-class.html#_blit_state">_blit_state</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_check_cfg">_check_cfg</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_check_gfx">_check_gfx</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_init_animation">_init_animation</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_initialize_position">_initialize_position</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_state_area">_state_area</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_update_animations">_update_animations</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_update_position">_update_position</a></code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="base.AGObject-class.html">base.AGObject</a></code></b> (private):
      <code><a href="base.AGObject-class.html#_setattrs">_setattrs</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>pygame.sprite.Sprite</code></b>:
      <code>__repr__</code>,
      <code>add</code>,
      <code>add_internal</code>,
      <code>alive</code>,
      <code>groups</code>,
      <code>remove</code>,
      <code>remove_internal</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Static Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-StaticMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.AGSprite-class.html">AGSprite</a></code></b> (private):
      <code><a href="spaceship.AGSprite-class.html#_closest_compare_dists">_closest_compare_dists</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.Ship-class.html">Ship</a></code></b>:
      <code><a href="spaceship.Ship-class.html#armour">armour</a></code>,
      <code><a href="spaceship.Ship-class.html#reactor">reactor</a></code>,
      <code><a href="spaceship.Ship-class.html#rect">rect</a></code>,
      <code><a href="spaceship.Ship-class.html#shield">shield</a></code>,
      <code><a href="spaceship.Ship-class.html#weapons">weapons</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.Ship-class.html">Ship</a></code></b> (private):
      <code><a href="spaceship.Ship-class.html#_current_weapon">_current_weapon</a></code>
      </p></div>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.BonusHolder-class.html">BonusHolder</a></code></b> (private):
      <code><a href="spaceship.BonusHolder-class.html#_bonus_cls_name">_bonus_cls_name</a></code>,
      <code><a href="spaceship.BonusHolder-class.html#_bonus_params">_bonus_params</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.Destructible-class.html">Destructible</a></code></b>:
      <code><a href="spaceship.Destructible-class.html#durability">durability</a></code>,
      <code><a href="spaceship.Destructible-class.html#explosion_cls_name">explosion_cls_name</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.AGSprite-class.html">AGSprite</a></code></b>:
      <code><a href="spaceship.AGSprite-class.html#align">align</a></code>,
      <code><a href="spaceship.AGSprite-class.html#center">center</a></code>,
      <code><a href="spaceship.AGSprite-class.html#cfg">cfg</a></code>,
      <code><a href="spaceship.AGSprite-class.html#gfx">gfx</a></code>,
      <code><a href="spaceship.AGSprite-class.html#max_speed">max_speed</a></code>,
      <code><a href="spaceship.AGSprite-class.html#mover">mover</a></code>,
      <code><a href="spaceship.AGSprite-class.html#offscreen_lifetime">offscreen_lifetime</a></code>,
      <code><a href="spaceship.AGSprite-class.html#offscreen_time">offscreen_time</a></code>,
      <code><a href="spaceship.AGSprite-class.html#pos">pos</a></code>,
      <code><a href="spaceship.AGSprite-class.html#screen_size">screen_size</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spaceship.AGSprite-class.html">AGSprite</a></code></b> (private):
      <code><a href="spaceship.AGSprite-class.html#_animations">_animations</a></code>,
      <code><a href="spaceship.AGSprite-class.html#_overlay">_overlay</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="base.AGObject-class.html">base.AGObject</a></code></b>:
      <code><a href="base.AGObject-class.html#clock">clock</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="spaceship.PlayerShip-class.html#current_weapon" class="summary-name">current_weapon</a>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pos</span>,
        <span class="sig-arg">*groups</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>pos</code></strong> (sequence) - Initial position of the ship. This pair defines position of 
          ship nose.</li>
        <li><strong class="pname"><code>groups</code></strong> (pygame.sprite.Group) - A sequence of groups the object will be added to.</li>
    </ul></dd>
    <dt>Overrides:
      <a href="spaceship.Ship-class.html#__init__">Ship.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="fly_up"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fly_up</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">on</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_up">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Either turn on the engine exhaust and move the ship up or turn it off.
  Both cases use <code><a href="spaceship.PlayerShip-class.html#exhaust" 
  class="link">exhaust</a></code>.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>on</code></strong> (boolean) - Tells whether the ship is to start or to stop movement.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="fly_down"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fly_down</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">boundary</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_down">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Move the ship down.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>boundary</code></strong> (unsigned integer) - Height of the viewport. Needed in order to check whether the 
          ship may fly farther downwards.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="fly_right"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fly_right</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">boundary</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.fly_right">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Move the ship right.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>boundary</code></strong> (unsigned integer) - Width of the viewport. Needed in order to check whether the 
          ship may fly farther towards the right edge of the screen.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="shoot"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">shoot</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.shoot">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Shot from currently selected weapon. Do nothing if there is no weapon 
  selected.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="damage"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">damage</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">damage</span>,
        <span class="sig-arg">speed</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.damage">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Deal damage and check whether the object ceases to exist. If so, call 
  <code><a href="spaceship.Ship-class.html#explode" 
  class="link">explode</a></code>.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>damage</code></strong> (integer) - Amount of raw damage the ship takes.</li>
    </ul></dd>
    <dt>Overrides:
      <a href="spaceship.Ship-class.html#damage">Ship.damage</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="update"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spaceship-pysrc.html#PlayerShip.update">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Update ship state (center, weapons, shield, armour, reactor, etc.)
  <dl class="fields">
    <dt>Overrides:
      <a href="spaceship.Ship-class.html#update">Ship.update</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Property Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-PropertyDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="current_weapon"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">current_weapon</h3>
  
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="spaceship.PlayerShip-class.html#get_current_weapon" class="summary-sig-name">spaceship.PlayerShip.get_current_weapon</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Jul 31 17:03:02 2008
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
